<%@ page language="java" pageEncoding="UTF-8"%>
<div ng-controller="DiscussForumEditController">
	<form callback="save" validate>
		<div class="form-group">
			<label>
				名称
			</label><br/>
			<input class="form-control" type="text" name="name" ng-model="forum.name" rule="required;" />
		</div>
		<div class="form-group">
			<label>
				是否需要审核
			</label><br/>
			<select class="form-control" ng-model="forum.check">
				<option value="true" ng-selected="forum.check==true">
					是
				</option>
				<option value="false" ng-selected="forum.check==false">
					否
				</option>
			</select>
		</div>
		<div class="form-group">
			<label>
				显示在首页的位置
			</label><br/>
			<select class="form-control" ng-model="forum.index_type">
				<option ng-repeat="indexType in indexTypes" value="{{indexType.id}}" ng-selected="{{forum.index_type==indexType.id}}">
					{{indexType.name}}
				</option>
			</select>
		</div>
		<div class="form-group">
			<label>
				索引 <i class="glyphicon glyphicon-exclamation-sign" message="'数字越大越靠后'" tooltip></i>
			</label>
			<input class="form-control" type="text" name="index" ng-model="forum.index" rule="required;integer[+];" />
		</div>
		<div>
			<button type="submit" class="btn btn-success btn-sm"><i class="glyphicon glyphicon-ok"/> 保存</button>
			<button type="button" class="btn btn-danger btn-sm" ng-click="cancel()"><i class="glyphicon glyphicon-remove"/> 取消</button>
		</div>
	</form>
</div>